//
//  PPLabCollectionViewCell.m
//  PPDL
//
//  Created by 王洋 on 2019/10/17.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "PPLabCollectionViewCell.h"

@implementation PPLabCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];

    self.layer.borderColor=UIColorHex(0x808080).CGColor;
    self.layer.cornerRadius = 3;
    self.layer.borderWidth = 0.5;
    self.itemTitle.adjustsFontSizeToFitWidth = YES;

}

- (void)fillCellWithModel:(PPCategoryModel *)model {
    
    self.itemTitle.text = [NSString stringWithFormat:@"%@",model.itemTitle];
    
    
//    self.backgroundColor = model.isSelect?UIColorHex(0xffffff):UIColorHex(0xf0f0f0);
    
    if (model.isSelect) {
        self.itemTitle.textColor = UIColorHex(0xff3737);
        self.layer.borderColor = UIColorHex(0xff3737).CGColor;
    } else {
        self.itemTitle.textColor = UIColorHex(0x555555);
        self.layer.borderColor = UIColorHex(0x808080).CGColor;
    }
    
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//
//        [self pp_clipCorners:UIRectCornerAllCorners radius:2.5 border:0.5 color:UIColorHex(0x808080)];
//
//    });
}

@end
